package com.xsprite.managesys.bean;

public enum ActionType {
	
	QUERY_PLAYER_BASIC_INFO(0, "queryPlayerBasicInfo", "/playerinfo/queryPlayerBasicInfo.jsp"),
	QUERY_PLAYER_BACK_INFO(1, "queryPlayerBackInfo", "/playerinfo/queryPlayerBackInfo.jsp")
	;
	
	private int type;
	private String name;
	private String jspPath;
	
	private ActionType(int type, String name, String jspPath){
		this.type = type;
		this.name = name;
		this.jspPath = jspPath;
	}
	
	public int getType() {
		return type;
	}
	public void setType(int type) {
		this.type = type;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getJspPath() {
		return jspPath;
	}
	public void setJspPath(String jspPath) {
		this.jspPath = jspPath;
	}
	
	public static ActionType getActionTypeByName(String name){
		for(ActionType at : ActionType.values()){
			if(at.getName().equals(name)){
				return at;
			}
		}
		return null;
	}
}
